import axios from '@/utils/axios'
export function fetchPermission(data) {
    return axios.post('/api/user/layout',data)
}
export function fetchPermission1(data) {
    return axios.get('/api/user/dynamiclayout',data)
}
export function queryPermissionsByUser(data) {
    return axios.get('/api/user/getUserPermissionByToken',data)
}
// 获取用户列表
export function getUserList() {
    return axios.get('/api/user/list')
}
// 获取角色列表
export function getRoleList() {
    return axios.get('/api/role/list')
}
// 获取所有权限
export function getAllPermissiion() {
    return axios.get('/api/permission/all')
}
// 获取一级权限列表
export function getFirstLevel() {
    return axios.get('/api/permission/resource')
}
// 获取次级权限列表
export function getNextLevel(id) {
    return axios.get(`/api/permission/level?id=${id}`)
}